package cn.bdqn.controller;

import cn.bdqn.dto.Dto;
import cn.bdqn.service.ItripHotelOrderService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;

/**
 * 2018/8/22
 *
 */
@Api(value = "API", basePath = "")
@Controller
public class DeleteOradeController {
    @Resource
    private ItripHotelOrderService itripHotelOrderService;

    @ApiOperation(value = "删除订单", httpMethod = "POST",
            protocols = "HTTP", produces = "application/json",
            response = Dto.class, notes = "删除订单 ")
    @RequestMapping(value = "/deleteOrder", method = RequestMethod.POST, produces = "application/json")
    @ResponseBody
    public Dto deleteOrder(@ApiParam(value = "订单的id", required = true, defaultValue = "必须填写") @RequestParam String id){
        return itripHotelOrderService.updateStatus(Long.valueOf(id));
    }


}
